package com.app.dao;

import com.app.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {
    @Select("select * from t_user")
    public List<User> find();
    @Select("select * from t_user where name=#{name}")
    public User findon(@Param("name") String name);
    @Insert("insert into t_user values(null,#{name},#{password},#{email})")
    public int regiter(User user);
    @Select("select * from t_user where name=#{name} and password=#{password}")
    public User login(@Param("name") String name,@Param("password") String password);
}
